home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 0103 / vb.zip / KFRAMES.FRM < prev    next >
Text File  |  1996-01-17  |  16KB  |  505 lines

  1. VERSION 2.00
  2. Begin Form FrameDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Knob Frame & Background Properties Demo"
  6.    ClientHeight    =   4305
  7.    ClientLeft      =   1080
  8.    ClientTop       =   1770
  9.    ClientWidth     =   6300
  10.    Height          =   4710
  11.    Left            =   1020
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4305
  17.    ScaleWidth      =   6300
  18.    Top             =   1425
  19.    Width           =   6420
  20.    Begin Frame Frame3 
  21.       BackColor       =   &H00C0C0C0&
  22.       Caption         =   "Frame Scale Properties"
  23.       FontBold        =   -1  'True
  24.       FontItalic      =   0   'False
  25.       FontName        =   "Arial"
  26.       FontSize        =   8.25
  27.       FontStrikethru  =   0   'False
  28.       FontUnderline   =   0   'False
  29.       Height          =   930
  30.       Left            =   2040
  31.       TabIndex        =   27
  32.       Top             =   150
  33.       Width           =   4110
  34.       Begin HScrollBar HScroll1 
  35.          Height          =   240
  36.          Index           =   0
  37.          Left            =   1680
  38.          Max             =   140
  39.          TabIndex        =   29
  40.          Top             =   270
  41.          Width           =   2000
  42.       End
  43.       Begin HScrollBar HScroll1 
  44.          Height          =   240
  45.          Index           =   1
  46.          Left            =   1680
  47.          Max             =   140
  48.          TabIndex        =   28
  49.          Top             =   510
  50.          Width           =   2000
  51.       End
  52.       Begin Label Label2 
  53.          AutoSize        =   -1  'True
  54.          BackStyle       =   0  'Transparent
  55.          Caption         =   "0"
  56.          Height          =   195
  57.          Index           =   0
  58.          Left            =   3750
  59.          TabIndex        =   0
  60.          Top             =   300
  61.          Width           =   135
  62.       End
  63.       Begin Label Label1 
  64.          AutoSize        =   -1  'True
  65.          BackStyle       =   0  'Transparent
  66.          Caption         =   "FrameScaleX:"
  67.          FontBold        =   0   'False
  68.          FontItalic      =   0   'False
  69.          FontName        =   "Arial"
  70.          FontSize        =   8.25
  71.          FontStrikethru  =   0   'False
  72.          FontUnderline   =   0   'False
  73.          Height          =   210
  74.          Index           =   0
  75.          Left            =   570
  76.          TabIndex        =   1
  77.          Top             =   285
  78.          Width           =   1005
  79.       End
  80.       Begin Label Label1 
  81.          AutoSize        =   -1  'True
  82.          BackStyle       =   0  'Transparent
  83.          Caption         =   "FrameScaleY:"
  84.          FontBold        =   0   'False
  85.          FontItalic      =   0   'False
  86.          FontName        =   "Arial"
  87.          FontSize        =   8.25
  88.          FontStrikethru  =   0   'False
  89.          FontUnderline   =   0   'False
  90.          Height          =   210
  91.          Index           =   1
  92.          Left            =   570
  93.          TabIndex        =   2
  94.          Top             =   525
  95.          Width           =   1020
  96.       End
  97.       Begin Label Label2 
  98.          AutoSize        =   -1  'True
  99.          BackStyle       =   0  'Transparent
  100.          Caption         =   "0"
  101.          Height          =   195
  102.          Index           =   1
  103.          Left            =   3750
  104.          TabIndex        =   25
  105.          Top             =   540
  106.          Width           =   135
  107.       End
  108.    End
  109.    Begin KNOB Knob1 
  110.       Angle           =   0
  111.       AutoRedraw      =   -1  'True
  112.       AVersion        =   2.5
  113.       BackgroundColor =   &H00000000&
  114.       BevelInner      =   1  ' 1 - Raised
  115.       BevelOuter      =   2  ' 2 - Inset
  116.       BevelWidth      =   2
  117.       BorderType      =   0  ' 0 - None
  118.       BorderWidth     =   2
  119.       Digital         =   0   'False
  120.       DigitalColor    =   &H00000000&
  121.       DigitalDecimals =   0
  122.       DigitalFontID   =   0
  123.       DigitalX        =   0
  124.       DigitalY        =   0
  125.       FontID          =   0
  126.       FrameColor      =   &H00C0C0C0&
  127.       FrameScaleX     =   1.1
  128.       FrameScaleY     =   1.1
  129.       FrameStyle      =   1  ' 1 - Circle
  130.       Height          =   2985
  131.       KnobColor       =   &H00808080&
  132.       KnobMultiTurn   =   0   'False
  133.       KnobMultiTurnValue=   1
  134.       KnobRadius      =   0.5
  135.       KnobSnap        =   -1  'True
  136.       KnobSnapIncrement=   1
  137.       KnobStyle       =   0  ' 0 - Cicular
  138.       KnobUserDefined =   ""
  139.       KnobValue       =   3
  140.       Left            =   240
  141.       MarkUserDefined =   ""
  142.       MouseControl    =   -1  'True
  143.       OutlineAlign    =   0  ' 0 - Left 
  144.       OutlineColor    =   &H00000000&
  145.       OutlineTitle    =   ""
  146.       OutlineWidth    =   0
  147.       Radius          =   0
  148.       TabIndex        =   26
  149.       Top             =   1200
  150.       Value           =   0
  151.       Width           =   2985
  152.       XScale          =   0
  153.       YScale          =   0
  154.       ZLoad           =   KFRAMES.FRX:0000
  155.    End
  156.    Begin Frame Frame1 
  157.       BackColor       =   &H00C0C0C0&
  158.       Caption         =   "Picture Properties"
  159.       FontBold        =   -1  'True
  160.       FontItalic      =   0   'False
  161.       FontName        =   "Arial"
  162.       FontSize        =   8.25
  163.       FontStrikethru  =   0   'False
  164.       FontUnderline   =   0   'False
  165.       Height          =   1695
  166.       Left            =   3525
  167.       TabIndex        =   15
  168.       Top             =   1140
  169.       Width           =   2625
  170.       Begin OptionButton Option1 
  171.          BackColor       =   &H00C0C0C0&
  172.          Caption         =   "FramePicture"
  173.          FontBold        =   0   'False
  174.          FontItalic      =   0   'False
  175.          FontName        =   "Arial"
  176.          FontSize        =   8.25
  177.          FontStrikethru  =   0   'False
  178.          FontUnderline   =   0   'False
  179.          Height          =   225
  180.          Index           =   0
  181.          Left            =   300
  182.          TabIndex        =   4
  183.          Top             =   300
  184.          Value           =   -1  'True
  185.          Width           =   1800
  186.       End
  187.       Begin OptionButton Option1 
  188.          BackColor       =   &H00C0C0C0&
  189.          Caption         =   "BackgroundPicture"
  190.          FontBold        =   0   'False
  191.          FontItalic      =   0   'False
  192.          FontName        =   "Arial"
  193.          FontSize        =   8.25
  194.          FontStrikethru  =   0   'False
  195.          FontUnderline   =   0   'False
  196.          Height          =   225
  197.          Index           =   1
  198.          Left            =   300
  199.          TabIndex        =   5
  200.          Top             =   540
  201.          Width           =   1800
  202.       End
  203.       Begin PictureBox Image1 
  204.          Height          =   645
  205.          Index           =   4
  206.          Left            =   1620
  207.          Picture         =   KFRAMES.FRX:006C
  208.          ScaleHeight     =   41
  209.          ScaleMode       =   3  'Pixel
  210.          ScaleWidth      =   41
  211.          TabIndex        =   6
  212.          Top             =   930
  213.          Width           =   645
  214.       End
  215.       Begin PictureBox Image1 
  216.          Height          =   645
  217.          Index           =   2
  218.          Left            =   960
  219.          Picture         =   KFRAMES.FRX:46A6
  220.          ScaleHeight     =   41
  221.          ScaleMode       =   3  'Pixel
  222.          ScaleWidth      =   41
  223.          TabIndex        =   7
  224.          Top             =   930
  225.          Width           =   645
  226.       End
  227.       Begin PictureBox Image1 
  228.          Height          =   645
  229.          Index           =   0
  230.          Left            =   300
  231.          Picture         =   KFRAMES.FRX:8C80
  232.          ScaleHeight     =   41
  233.          ScaleMode       =   3  'Pixel
  234.          ScaleWidth      =   41
  235.          TabIndex        =   8
  236.          Top             =   930
  237.          Width           =   645
  238.       End
  239.    End
  240.    Begin Frame Frame4 
  241.       BackColor       =   &H00C0C0C0&
  242.       Caption         =   "Color Properties"
  243.       FontBold        =   -1  'True
  244.       FontItalic      =   0   'False
  245.       FontName        =   "Arial"
  246.       FontSize        =   8.25
  247.       FontStrikethru  =   0   'False
  248.       FontUnderline   =   0   'False
  249.       Height          =   1395
  250.       Left            =   3525
  251.       TabIndex        =   20
  252.       Top             =   2820
  253.       Width           =   2625
  254.       Begin OptionButton Option3 
  255.          BackColor       =   &H00C0C0C0&
  256.          Caption         =   "BackgroundColor"
  257.          FontBold        =   0   'False
  258.          FontItalic      =   0   'False
  259.          FontName        =   "Arial"
  260.          FontSize        =   8.25
  261.          FontStrikethru  =   0   'False
  262.          FontUnderline   =   0   'False
  263.          Height          =   210
  264.          Index           =   1
  265.          Left            =   330
  266.          TabIndex        =   9
  267.          Top             =   540
  268.          Width           =   1800
  269.       End
  270.       Begin OptionButton Option3 
  271.          BackColor       =   &H00C0C0C0&
  272.          Caption         =   "FrameColor"
  273.          FontBold        =   0   'False
  274.          FontItalic      =   0   'False
  275.          FontName        =   "Arial"
  276.          FontSize        =   8.25
  277.          FontStrikethru  =   0   'False
  278.          FontUnderline   =   0   'False
  279.          Height          =   210
  280.          Index           =   0
  281.          Left            =   330
  282.          TabIndex        =   10
  283.          Top             =   300
  284.          Value           =   -1  'True
  285.          Width           =   1800
  286.       End
  287.       Begin Label HColors 
  288.          BackColor       =   &H000080FF&
  289.          Height          =   225
  290.          Index           =   4
  291.          Left            =   1230
  292.          TabIndex        =   11
  293.          Top             =   990
  294.          Width           =   225
  295.       End
  296.       Begin Label HColors 
  297.          BackColor       =   &H00000000&
  298.          Height          =   225
  299.          Index           =   0
  300.          Left            =   270
  301.          TabIndex        =   16
  302.          Top             =   990
  303.          Width           =   225
  304.       End
  305.       Begin Label HColors 
  306.          BackColor       =   &H00808080&
  307.          Height          =   225
  308.          Index           =   5
  309.          Left            =   1470
  310.          TabIndex        =   17
  311.          Top             =   990
  312.          Width           =   225
  313.       End
  314.       Begin Label HColors 
  315.          BackColor       =   &H00FFFFFF&
  316.          Height          =   225
  317.          Index           =   1
  318.          Left            =   510
  319.          TabIndex        =   18
  320.          Top             =   990
  321.          Width           =   225
  322.       End
  323.       Begin Label HColors 
  324.          BackColor       =   &H000000FF&
  325.          Height          =   225
  326.          Index           =   6
  327.          Left            =   1710
  328.          TabIndex        =   19
  329.          Top             =   990
  330.          Width           =   225
  331.       End
  332.       Begin Label HColors 
  333.          BackColor       =   &H0000FF00&
  334.          Height          =   225
  335.          Index           =   2
  336.          Left            =   750
  337.          TabIndex        =   24
  338.          Top             =   990
  339.          Width           =   225
  340.       End
  341.       Begin Label HColors 
  342.          BackColor       =   &H0000FFFF&
  343.          Height          =   225
  344.          Index           =   7
  345.          Left            =   1950
  346.          TabIndex        =   23
  347.          Top             =   990
  348.          Width           =   225
  349.       End
  350.       Begin Label HColors 
  351.          BackColor       =   &H00FF0000&
  352.          Height          =   225
  353.          Index           =   3
  354.          Left            =   990
  355.          TabIndex        =   22
  356.          Top             =   990
  357.          Width           =   225
  358.       End
  359.       Begin Label HColors 
  360.          BackColor       =   &H00FF00FF&
  361.          Height          =   225
  362.          Index           =   8
  363.          Left            =   2190
  364.          TabIndex        =   21
  365.          Top             =   990
  366.          Width           =   225
  367.       End
  368.    End
  369.    Begin Frame Frame2 
  370.       BackColor       =   &H00C0C0C0&
  371.       Caption         =   "FrameStyle"
  372.       FontBold        =   -1  'True
  373.       FontItalic      =   0   'False
  374.       FontName        =   "Arial"
  375.       FontSize        =   8.25
  376.       FontStrikethru  =   0   'False
  377.       FontUnderline   =   0   'False
  378.       Height          =   930
  379.       Left            =   225
  380.       TabIndex        =   12
  381.       Top             =   135
  382.       Width           =   1575
  383.       Begin OptionButton Option2 
  384.          BackColor       =   &H00C0C0C0&
  385.          Caption         =   "Rectangle"
  386.          FontBold        =   0   'False
  387.          FontItalic      =   0   'False
  388.          FontName        =   "Arial"
  389.          FontSize        =   8.25
  390.          FontStrikethru  =   0   'False
  391.          FontUnderline   =   0   'False
  392.          Height          =   225
  393.          Index           =   2
  394.          Left            =   195
  395.          TabIndex        =   3
  396.          Top             =   645
  397.          Width           =   1000
  398.       End
  399.       Begin OptionButton Option2 
  400.          BackColor       =   &H00C0C0C0&
  401.          Caption         =   "Circle"
  402.          FontBold        =   0   'False
  403.          FontItalic      =   0   'False
  404.          FontName        =   "Arial"
  405.          FontSize        =   8.25
  406.          FontStrikethru  =   0   'False
  407.          FontUnderline   =   0   'False
  408.          Height          =   225
  409.          Index           =   1
  410.          Left            =   195
  411.          TabIndex        =   14
  412.          Top             =   435
  413.          Width           =   1000
  414.       End
  415.       Begin OptionButton Option2 
  416.          BackColor       =   &H00C0C0C0&
  417.          Caption         =   "None"
  418.          FontBold        =   0   'False
  419.          FontItalic      =   0   'False
  420.          FontName        =   "Arial"
  421.          FontSize        =   8.25
  422.          FontStrikethru  =   0   'False
  423.          FontUnderline   =   0   'False
  424.          Height          =   225
  425.          Index           =   0
  426.          Left            =   195
  427.          TabIndex        =   13
  428.          Top             =   225
  429.          Width           =   1000
  430.       End
  431.    End
  432. End
  433.  
  434. Sub Form_Load ()
  435.  
  436.     hscroll1(0) = knob1.FrameScaleX * 100
  437.     hscroll1(1) = knob1.FrameScaleY * 100
  438.     option2(knob1.FrameStyle) = True
  439.  
  440. End Sub
  441.  
  442. Sub HColors_Click (index As Integer)
  443.  
  444.     If option3(0) Then
  445.         knob1.FrameColor = hcolors(index).BackColor
  446.         knob1.FramePicture = LoadPicture("")
  447.     Else
  448.         knob1.BackgroundColor = hcolors(index).BackColor
  449.         knob1.BackgroundPicture = LoadPicture("")
  450.     End If
  451.  
  452. End Sub
  453.  
  454. Sub HScroll1_Change (index As Integer)
  455.  
  456.     Select Case index
  457.         Case 0
  458.             knob1.FrameScaleX = hscroll1(0) / 100
  459.             label2(0) = hscroll1(0) / 100
  460.         Case 1
  461.             knob1.FrameScaleY = hscroll1(1) / 100
  462.             label2(1) = hscroll1(1) / 100
  463.     End Select
  464.  
  465. End Sub
  466.  
  467. Sub HScroll1_Scroll (index As Integer)
  468.  
  469.     Select Case index
  470.         Case 0
  471.             knob1.FrameScaleX = hscroll1(0) / 100
  472.             label2(0) = hscroll1(0) / 100
  473.         Case 1
  474.             knob1.FrameScaleY = hscroll1(1) / 100
  475.             label2(1) = hscroll1(1) / 100
  476.     End Select
  477.  
  478. End Sub
  479.  
  480. Sub Image1_Click (index As Integer)
  481.  
  482.     If option1(0) Then
  483.         knob1.FramePicture = Image1(index).Picture
  484.     Else
  485.         knob1.BackgroundPicture = Image1(index).Picture
  486.     End If
  487.  
  488. End Sub
  489.  
  490. Sub Option2_Click (index As Integer)
  491.  
  492.     knob1.FrameStyle = index
  493.     If index = 1 Then
  494.         label1(1).Visible = False
  495.         hscroll1(1).Visible = False
  496.         label2(1).Visible = False
  497.     Else
  498.         label1(1).Visible = True
  499.         hscroll1(1).Visible = True
  500.         label2(1).Visible = True
  501.     End If
  502.  
  503. End Sub
  504.  
  505.